 
 
* Construct quarterly measure of xi index.
* MV, Sept 2018
* --------------

clear

import delim using patents.csv, delim(",") rowr(1:) varnames(1)

 
gen date1=date(idate,"MDY")

gen quarter = qofd(date1)
format quarter %tq

drop date1 

* form 
collapse (sum) xi, by (quarter)


export delim quarter xi using xiq.csv, delim(",") replace


